package com.sise.thread.lab01;


import java.util.LinkedList;
import java.util.Queue;

//一款生产者和消费者模型的demo
public class InterThreadCommunicationExample {
    public static void main(String[] args) {
        Queue queue=new LinkedList();
        Thread productThread=new Producer(queue);
        Thread consumerThread=new Consumer(queue);
        productThread.start();  //调用了start状态后，会变为runnable状态，至于什么时候run，这个是说不定的
        consumerThread.start();
    }
}
